package com.version1_4.service.implement;

import com.util.format.ReevesMap;
import com.version1_4.dao.UserDao1_4;
import com.version1_4.service.UserService1_4;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by reeveslee on 16/5/18.
 */
@Service
public class UserServiceImpl1_4 implements UserService1_4 {

    @Autowired
    private UserDao1_4 userDao14;

    @Override
    public String logout(int userId) {
        ReevesMap reevesMap = new ReevesMap();
        boolean result = userDao14.logout(userId);
        if (result == false) {
            reevesMap.setCode(500);
            reevesMap.setInfo("Error Occurred During Flush BaiduId");
        }
        reevesMap.put("result", result);
        return reevesMap.toJsonString();
    }
}
